Normally, the lines in a multi-line macro are indented relative to each other as though they were code. You can suppress this behavior by setting the following user option:
Enable syntactic analysis inside macros, which is the default. If this is
nil, all lines inside macro definitions are analyzed ascpp-macro-cont.
CC Mode provides some tools to help keep the line continuation backslashes in macros neat and tidy. Their precise action is customized with these variables:
— User Option: c-backslash-max-column
These variables control the alignment columns for line continuation backslashes in multiline macros. They are used by the functions that automatically insert or align such backslashes, e.g.
c-backslash-regionandc-context-line-break.
c-backslash-columnspecifies the minimum column for the backslashes. If any line in the macro goes past this column, then the next tab stop (i.e. next multiple oftab-width) in that line is used as the alignment column for all the backslashes, so that they remain in a single column. However, if any lines go pastc-backslash-max-columnthen the backslashes in the rest of the macro will be kept at that column, so that the lines which are too long “stick out” instead.Don't ever set these variables to
nil. If you want to disable the automatic alignment of backslashes, usec-auto-align-backslashes.
Align automatically inserted line continuation backslashes if non-
nil. When line continuation backslashes are inserted automatically for line breaks in multiline macros, e.g. byc-context-line-break, they are aligned with the other backslashes in the same macro if this flag is set.If
c-auto-align-backslashesisnil, automatically inserted backslashes are preceded by a single space, and backslashes get aligned only when you explicitly invoke the commandc-backslash-region(C-c C-\).